The internal combustion engine is an engine in which the combustion of a fuel (normally a fossil fuel) occurs with an oxidizer (usually air) in a combustion chamber. In an internal combustion engine, the expansion of the high-temperature and high-pressure gases produced by combustion applies direct force to some component of the engine, such as pistons, turbine blades, or a nozzle. This force moves the component over a distance, generating useful mechanical energy.
The term internal combustion engine usually refers to an engine in which combustion is intermittent, such as the more familiar four-stroke and two-stroke piston engines, along with variants, such as the six-stroke piston engine and the Wankel rotary engine. A second class of internal combustion engines use continuous combustion: gas turbines, jet engines and most rocket engines, each of which is an internal combustion engine on the same principle as previously described.
The internal combustion engine (or ICE) is quite different from external combustion engines, such as steam or Stirling engines, in which the energy is delivered to a working fluid not consisting of, mixed with, or contaminated by combustion products. Working fluids can be air, hot water, pressurized water or even liquid sodium, heated in some kind of boiler.
A large number of different designs for ICEs have been developed and built, with a variety of different strengths and weaknesses. ICEs are powered by an energy-dense fuel which is very frequently gasoline, a liquid derived from fossil fuels. While there have been and still are many stationary applications, the real strength of internal combustion engines is in mobile applications and they dominate as a power supply for cars, aircraft, and boats.
Engines based on the four-stroke (“Otto cycle”) have one power stroke for every four strokes (up-down-up-down) and employ spark plug ignition. Combustion occurs rapidly, and during combustion the volume varies little (“constant volume”). They are used in cars, larger boats, some motorcycles, and many light aircraft. They are generally quieter, more efficient, and larger than their two-stroke counterparts.
The steps involved in the operation of a four-stroke ICE are:                1. Intake stroke: Air and vaporized fuel are drawn in.        2. Compression stroke: Fuel vapor and air are compressed and ignited.        3. Combustion stroke: Fuel combusts and piston is pushed downwards.        4. Exhaust stroke: Exhaust is driven out.During the 1st, 2nd, and 4th stroke the piston is relying on power and the momentum generated by the other pistons through a common crankshaft. In that case, generally a four-cylinder engine would be less powerful than a six or eight cylinder engine.        
Once ignited and burnt, the combustion products—hot gases—have more available thermal energy than the original compressed fuel-air mixture (which had higher chemical energy). The available energy is manifested as high temperature and high pressure that can be translated into work by the engine. In a reciprocating engine, the high-pressure gases inside the cylinders drive the engine's pistons.
Once the available energy has been removed, the remaining hot gases are vented (often by opening a valve or exposing the exhaust outlet) and this allows the piston to return to its previous position (top dead center, or TDC). The piston can then proceed to the next phase of its cycle, which varies between engines. Any heat that isn't translated into work is normally considered a waste product and is removed from the engine either by an air or a liquid cooling system.
Engine efficiency can be discussed in a number of ways but it usually involves a comparison of the total chemical energy in the fuels, and the useful energy extracted from the fuels in the form of kinetic energy. The most fundamental and abstract discussion of engine efficiency is the thermodynamic limit for extracting energy from the fuel defined by a thermodynamic cycle. The most comprehensive is the empirical fuel efficiency of the total engine system for accomplishing a desired task; for example, the miles per gallon accumulated.
Internal combustion engines are primarily heat engines and as such the phenomenon that limits their efficiency is described by thermodynamic cycles. None of these cycles exceed the limit defined by the Carnot cycle which states that the overall efficiency is dictated by the difference between the lower and upper operating temperatures of the engine. A terrestrial engine is usually and fundamentally limited by the upper thermal stability derived from the material used to make up the engine. All metals and alloys eventually melt or decompose and there is significant researching into ceramic materials that can be made with higher thermal stabilities and desirable structural properties. Higher thermal stability allows for greater temperature difference between the lower and upper operating temperatures—thus greater thermodynamic efficiency.
The thermodynamic limits assume that the engine is operating in ideal conditions: a frictionless world, ideal gases, perfect insulators, and operation at infinite time. The real world is substantially more complex and all the complexities reduce the efficiency. In addition, real engines run best at specific loads and rates as described by their power band. For example, a car cruising on a highway is usually operating significantly below its ideal load, because the engine is designed for the higher loads desired for rapid acceleration. The applications in which the engines are used contribute drag on the total system reducing overall efficiency, such as wind resistance designs for vehicles. These and many other losses result in an engine's real-world fuel economy that is usually measured in the units of miles per gallon (or fuel consumption in liters per 100 kilometers) for automobiles. The miles in “miles per gallon” represent a meaningful amount of work and the volume of hydrocarbon implies a standard energy content.
Research into ceramic materials that can be made with higher thermal stability allows for greater temperature difference between the lower and upper operating temperature and, thus, greater thermodynamic efficiency. Those materials can be justified only for high speed engines when a large amount of fuel is burned per unit of time to maintain the engine temperature as close as possible of the maximum limit of combustion temperature without degrading. That depends basically at what pressure and temperature upper limit knocking phenomena is produced at the end of compression cycle, because increasing that pressure increases the explosion temperature, but the real limitation in the upper temperature is in the anti-knocking characteristic of the fuel. Ceramics like magnesium zirconate can form a thermal barrier that can be useful in energy losses by cooling, improving efficiency.
Most of nodular cast iron engines using low octane gasoline made for low compression ratio have a thermodynamic limit of 37%. Even when aided with a turbocharger, power is increased but the efficiency will decrease in most cases. Most of those engines retain an average efficiency of about 18%-20% independent of stock efficiency aids.
There are many inventions concerned with increasing the efficiency of IC engines. In general, practical engines are always compromised by trade-offs between different properties such as efficiency, weight, power, heat, response, exhaust emissions, or noise. Sometimes economy also plays a role in not only the cost of manufacturing the engine itself, but also manufacturing and distributing the fuel. Increasing the engine's efficiency brings better fuel economy but only if the fuel cost per anti-knocking ability and energy content is the same. For example, high compression ratio 9:1-10.5:1 engines are more efficient than low compression ratio 7:1 engines, but use a more expensive gasoline. In general most of the inventions and designs of manufactured engines today are related to more efficient combustion chamber shapes, fuel injection systems that maintain the best as possible gasoline-air ratio for air speed variation and density for different regimes. Also, in the matter of energy losses by cooling experience demonstrates that short stroke engine designs are more efficient.